<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/24/024
 * Time: 11:43
 */

namespace App\Validator;


class League extends BaseValidate
{
    protected $rules = [
        'id'=>'required|integer',
        'name'=>'required|string|max:100',
        'status'=>'required|integer|in:-1,0,1'
    ];
    protected $messages = [
        'id.required'=>'id参数缺失',
        'id.integer'=>'id参数格式错误',
        'name.required'=>'名称参数缺失',
        'name.string'=>'名称参数格式错误',
        'name.max'=>'名称参数最长10位',
        'status.required'=>'状态参数缺失',
        'status.integer'=>'状态参数格式错误',
        'status.in'=>'状态参数值错误',

    ];
    protected $scenes = [
        'add'=>['name','status'],
        'edit'=>['id','name','status'],
    ];

}